﻿<!DOCTYPE html>
<html>

<head>
  <title>欢迎来到 FabCc!</title>
  <style>
    body {
      width: 35em;
      margin: 0 auto;
      font-family: Tahoma, Verdana, Arial, sans-serif;
    }
  </style>
<script type="text/javascript" src="s/pm/js/jquery.min.js"></script>
</head>

<body>
  <h1>Welcome to FabCc!</h1>
  <p>If you see this page, the FabCc web server is successfully installed and
    working. </p>
  <img style="opacity: 0.4;position: absolute;z-index: -1;width: inherit" src="./1.png" alt="Alternate Text" />
  <a href="/index.html">FabCc[[server]]</a> 
  <button onclick="ajax('/txt')" style="">compress</button>&nbsp;<a href="/test.html">Test[[Postman]]</a>.<br />
  <textarea id="txt" style="margin-top: 4px;background-color:transparent;" cols="85" rows="34"
    placeholder=" Webmaster Tools -> code compressor"></textarea>
  <script>
    function ajax(url) {
      $.ajax({
        url: url,
        type: "post",
        timeout: 3000,
        processData: false,
        // dataType:'JSON',
        // contentType:"application/json",
        contentType: "text/plain;charset=UTF-8",
        data: document.getElementById("txt").value.replace(/(	|	|  )+/g, " "),
        //headers: {
        //  a: document.getElementById("token").value
        //},
        async: false,
        success: function (data) {
          document.getElementById("txt").value = data;
          // console.log(data);
        },
        error: function (data) {
          document.getElementById("txt").value = data.responseText;
          // document.getElementById("text").innerHTML = data.responseText;
          // console.log(data);
        }
      });
    }
  </script>
  <br/>
  <em>Thank you for using FabCc.</em></p>
</body>

</html>